package edu.moravian.UI.entity;

import edu.moravian.entity.BallEntity;
import edu.moravian.world.World2D;
import java.awt.Color;

/**
 * The visual representation of a ball entity
 *
 * @author Elliot
 */
public class BallEntityView
{
    private BallEntity ballModel;
    private Color color;

    /**
     * Create a new ball view with a specific color and the underlying model
     *
     * @param ballModel the model for the ball
     * @param color the color of the ball
     */
    public BallEntityView(BallEntity ballModel, Color color)
    {
        this.ballModel = ballModel;
        this.color = color;
    }




    /**
     * Draw the ball on the provided graphics
     *
     * @param w2d the canvas to draw on
     */
    public void draw(World2D w2d)
    {
        w2d.setColor(color);
        w2d.drawCenteredCircle(ballModel.getLocation(), ballModel.getRadius());
    }

}



